import { downloadFile, queryUrlParams } from '@/utils/index'
import request from '@/utils/request'

export function downloadTermDrug(data) {
  request({
    url: 'drugremain/downloadDrugByTerm?' + queryUrlParams(data),
    method: 'get',
    responseType: 'blob'
  }).then(result => {
    downloadFile(result, '过期药品表', 'xlsx')
  })
}

export function update(data) {
  return request({
    url: 'drugremain/update',
    method: 'post',
    data
  })
}
